package project;

import java.util.ArrayList;

import CAD.MainFrame;

import features.Block;
import features.Feature;

public class Project {
	
	public int id;
	public String nome;
	public Block block;
	public ArrayList<Feature> features;
	public String stepCode;
	public Designer designer;
	

	private String makeStepCode() {
		// must create the stepcode
		return "";
	}

	public Project(String stepCode){
		//the construtor must define the block, features and designer
		
	}
	
	
	public Project(int id, String nome, Block block,
			ArrayList<Feature> features,  Designer designer) {
		super();
		this.id = id;
		this.nome = nome;
		this.block = block;
		this.features = features;
		//this.stepCode = stepCode; must create the stepnc code
		this.designer = designer;
	}

	public void refresh(){
		this.block=MainFrame.block;
		this.features=MainFrame.features;
		this.stepCode=makeStepCode();
		this.designer= Designer.getInstance();
	}

	

	public Project() {
		// TODO Auto-generated constructor stub
	}


	public String getNome() {
		return nome;
	}


	public void setNome(String nome) {
		this.nome = nome;
	}


	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}

	public Block getBlock() {
		return block;
	}

	public void setBlock(Block block) {
		this.block = block;
	}

	public ArrayList<Feature> getFeatures() {
		return features;
	}

	public void setFeatures(ArrayList<Feature> features) {
		this.features = features;
	}

	public String getStepCode() {
		return stepCode;
	}

	public void setStepCode(String stepCode) {
		this.stepCode = stepCode;
	}

	public Designer getDesigner() {
		return designer;
	}

	public void setDesigner(Designer designer) {
		this.designer = designer;
	}
	
}
